using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToShapefile
{
    /// <summary>
    /// <para>Feature Class To Shapefile</para>
    /// <para>Copies the features from one or more feature classes or layers to a folder of shapefiles.</para>
    /// <para>将要素从一个或多个要素类或图层复制到 shapefile 文件夹中。</para>
    /// </summary>    
    [DisplayName("Feature Class To Shapefile")]
    public class FeatureClassToShapefile : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FeatureClassToShapefile()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Features">
        /// <para>Input Features</para>
        /// <para>The list of input feature classes or feature layers that will be converted and added to the output folder.</para>
        /// <para>将转换并添加到输出文件夹的输入要素类或要素图层的列表。</para>
        /// </param>
        /// <param name="_Output_Folder">
        /// <para>Output Folder</para>
        /// <para>The folder where the shapefiles will be written.</para>
        /// <para>将写入 shapefile 的文件夹。</para>
        /// </param>
        public FeatureClassToShapefile(List<object> _Input_Features, object _Output_Folder)
        {
            this._Input_Features = _Input_Features;
            this._Output_Folder = _Output_Folder;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Feature Class To Shapefile";

        public override string CallName => "conversion.FeatureClassToShapefile";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_Input_Features, _Output_Folder, _Derived_Folder];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The list of input feature classes or feature layers that will be converted and added to the output folder.</para>
        /// <para>将转换并添加到输出文件夹的输入要素类或要素图层的列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Input_Features { get; set; }


        /// <summary>
        /// <para>Output Folder</para>
        /// <para>The folder where the shapefiles will be written.</para>
        /// <para>将写入 shapefile 的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Folder { get; set; }


        /// <summary>
        /// <para>Updated Output Folder</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _Derived_Folder { get; set; }


        public FeatureClassToShapefile SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}